
var $$scope;
var $CertusFormAjax;
var $CertusJsonAjax;
var $backlogPersonList;

// 借款管理列表
var borrowingColumns = [{
    id: 'borrowingName',
    title: '借款类型',
    type: 'string',
    width: 75,
    columnClass: 'text-center',
}, {
    id: 'projName',
    title: '项目名称',
    type: 'string',
    width: 150,
    columnClass: 'text-center',
}, {
    id: 'borrowingAmount',
    title: '借款金额',
    type: 'string',
    width: 150,
    columnClass: 'text-center',
    resolution: function (value, record, column, grid, dataNo, columnNo) {
        var content = '￥' + value + '元';
        return content;
      }
},  {
    id: 'borrowingApplyManName',
    title: '申请人',
    type: 'string',
    width: 75,
    columnClass: 'text-center',
}, {
    id: 'createTime',
    title: '申请时间',
    type: 'string',
    width: 150,
    columnClass: 'text-center',
    resolution:function (value, record, column, grid, dataNo, columnNo){
        var date = new Date(record.createTime);
        var content = $.fn.dlshouwen.grid.tools.dateFormat(date, "yyyy-MM-dd hh:mm");
        return content;
    }
}, {
    id: 'borrowerCode',
    title: '借款编号',
    type: 'string',
    // width: 100,
    columnClass: 'text-left',
}, {
    id: 'bigDecimal',
    title: '还款数额',
    type: 'string',
    // width: 100,
    columnClass: 'text-left',
}, {
    id: 'borrowingOrigin',
    title: '申请事由',
    type: 'string',
    // width: 100,
    columnClass: 'text-left',
}, {
    id: 'operation',
    title: '操作',
    width: 60,
    type: 'string',
    columnClass: 'text-center',
    resolution: function (value, record, column, grid, dataNo, columnNo) {
        var content = '';
        content += '<a class="btn btn-xs btn-primary" href="#/selBorrowing/'+record.borrowerCode+'"><i class="icon-eye-open"></i>  查看</a>';
        return content;
    }
}, ];


$(function () {
    $(".typesel").change(function () {
        if ($(this).val() == 1) {
            $(".tyepoption").val("个人");
            $(".tyepoption").attr("disabled", true);
        } else if ($(this).val() == 2) {
            $(".tyepoption").val("");
            $(".tyepoption").attr("disabled", false);
        }
    })
});